package com.sdonkey.score.bean;

import java.io.Serializable;

import org.apache.commons.lang.StringUtils;

public class AppBean implements Serializable {
	private static final long serialVersionUID = -4335464697591187685L;

	private String appId;

	private String name;

	private String descr;

	private String iconUrl;

	private String adTag;

	private String versionCode;

	private String createTime;

	private String updateTime;;

	private String osType;

	private String terminalType;

	private String status;

	private String showIconUrl;

	// mobile
	private String mIosUrl;

	private String mIosSize;;

	private String mIosVcode;

	private String mIosHref;

	private String mAndroidUrl;

	private String mAndroidSize;;

	private String mAndroidVcode;

	private String mAndroidHref;

	// pc
	private String pcIosUrl;

	private String pcIosSize;;

	private String pcIosVcode;

	private String pcIosHref;

	private String pcWUrl;

	private String pcWSize;;

	private String pcWVcode;

	private String pcWHref;

	// pad
	private String padIosUrl;

	private String padIosSize;;

	private String padIosVcode;

	private String padIosHref;

	private String padAndroidUrl;

	private String padAndroidSize;;

	private String padAndroidVcode;

	private String padAndroidHref;

	// tv
	private String tvIosUrl;

	private String tvIosSize;;

	private String tvIosVcode;

	private String tvIosHref;

	private String tvAndroidUrl;

	private String tvAndroidSize;;

	private String tvAndroidVcode;

	private String tvAndroidHref;

	public String terminalTypeShow() {

		String terminalType = "";
		return terminalType;
	}

	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getVersionCode() {
		return versionCode;
	}

	public void setVersionCode(String versionCode) {
		this.versionCode = versionCode;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	public String getOsType() {
		return osType;
	}

	public void setOsType(String osType) {
		this.osType = osType;
	}

	public String getTerminalType() {
		return terminalType;
	}

	public void setTerminalType(String terminalType) {
		this.terminalType = terminalType;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getmIosUrl() {
		return mIosUrl;
	}

	public void setmIosUrl(String mIosUrl) {
		this.mIosUrl = mIosUrl;
	}

	public String getmIosSize() {
		return mIosSize;
	}

	public void setmIosSize(String mIosSize) {
		this.mIosSize = mIosSize;
	}

	public String getmIosVcode() {
		return mIosVcode;
	}

	public void setmIosVcode(String mIosVcode) {
		this.mIosVcode = mIosVcode;
	}

	public String getmIosHref() {
		return mIosHref;
	}

	public void setmIosHref(String mIosHref) {
		this.mIosHref = mIosHref;
	}

	public String getmAndroidUrl() {
		return mAndroidUrl;
	}

	public void setmAndroidUrl(String mAndroidUrl) {
		this.mAndroidUrl = mAndroidUrl;
	}

	public String getmAndroidSize() {
		return mAndroidSize;
	}

	public void setmAndroidSize(String mAndroidSize) {
		this.mAndroidSize = mAndroidSize;
	}

	public String getmAndroidVcode() {
		return mAndroidVcode;
	}

	public void setmAndroidVcode(String mAndroidVcode) {
		this.mAndroidVcode = mAndroidVcode;
	}

	public String getmAndroidHref() {
		return mAndroidHref;
	}

	public void setmAndroidHref(String mAndroidHref) {
		this.mAndroidHref = mAndroidHref;
	}

	public String getPcIosUrl() {
		return pcIosUrl;
	}

	public void setPcIosUrl(String pcIosUrl) {
		this.pcIosUrl = pcIosUrl;
	}

	public String getPcIosSize() {
		return pcIosSize;
	}

	public void setPcIosSize(String pcIosSize) {
		this.pcIosSize = pcIosSize;
	}

	public String getPcIosVcode() {
		return pcIosVcode;
	}

	public void setPcIosVcode(String pcIosVcode) {
		this.pcIosVcode = pcIosVcode;
	}

	public String getPcIosHref() {
		return pcIosHref;
	}

	public void setPcIosHref(String pcIosHref) {
		this.pcIosHref = pcIosHref;
	}

	public String getPcWUrl() {
		return pcWUrl;
	}

	public void setPcWUrl(String pcWUrl) {
		this.pcWUrl = pcWUrl;
	}

	public String getPcWSize() {
		return pcWSize;
	}

	public void setPcWSize(String pcWSize) {
		this.pcWSize = pcWSize;
	}

	public String getPcWVcode() {
		return pcWVcode;
	}

	public void setPcWVcode(String pcWVcode) {
		this.pcWVcode = pcWVcode;
	}

	public String getPcWHref() {
		return pcWHref;
	}

	public void setPcWHref(String pcWHref) {
		this.pcWHref = pcWHref;
	}

	public String getPadIosUrl() {
		return padIosUrl;
	}

	public void setPadIosUrl(String padIosUrl) {
		this.padIosUrl = padIosUrl;
	}

	public String getPadIosSize() {
		return padIosSize;
	}

	public void setPadIosSize(String padIosSize) {
		this.padIosSize = padIosSize;
	}

	public String getPadIosVcode() {
		return padIosVcode;
	}

	public void setPadIosVcode(String padIosVcode) {
		this.padIosVcode = padIosVcode;
	}

	public String getPadIosHref() {
		return padIosHref;
	}

	public void setPadIosHref(String padIosHref) {
		this.padIosHref = padIosHref;
	}

	public String getPadAndroidUrl() {
		return padAndroidUrl;
	}

	public void setPadAndroidUrl(String padAndroidUrl) {
		this.padAndroidUrl = padAndroidUrl;
	}

	public String getPadAndroidSize() {
		return padAndroidSize;
	}

	public void setPadAndroidSize(String padAndroidSize) {
		this.padAndroidSize = padAndroidSize;
	}

	public String getPadAndroidVcode() {
		return padAndroidVcode;
	}

	public void setPadAndroidVcode(String padAndroidVcode) {
		this.padAndroidVcode = padAndroidVcode;
	}

	public String getPadAndroidHref() {
		return padAndroidHref;
	}

	public void setPadAndroidHref(String padAndroidHref) {
		this.padAndroidHref = padAndroidHref;
	}

	public String getTvIosUrl() {
		return tvIosUrl;
	}

	public void setTvIosUrl(String tvIosUrl) {
		this.tvIosUrl = tvIosUrl;
	}

	public String getTvIosSize() {
		return tvIosSize;
	}

	public void setTvIosSize(String tvIosSize) {
		this.tvIosSize = tvIosSize;
	}

	public String getTvIosVcode() {
		return tvIosVcode;
	}

	public void setTvIosVcode(String tvIosVcode) {
		this.tvIosVcode = tvIosVcode;
	}

	public String getTvIosHref() {
		return tvIosHref;
	}

	public void setTvIosHref(String tvIosHref) {
		this.tvIosHref = tvIosHref;
	}

	public String getTvAndroidUrl() {
		return tvAndroidUrl;
	}

	public void setTvAndroidUrl(String tvAndroidUrl) {
		this.tvAndroidUrl = tvAndroidUrl;
	}

	public String getTvAndroidSize() {
		return tvAndroidSize;
	}

	public void setTvAndroidSize(String tvAndroidSize) {
		this.tvAndroidSize = tvAndroidSize;
	}

	public String getTvAndroidVcode() {
		return tvAndroidVcode;
	}

	public void setTvAndroidVcode(String tvAndroidVcode) {
		this.tvAndroidVcode = tvAndroidVcode;
	}

	public String getTvAndroidHref() {
		return tvAndroidHref;
	}

	public void setTvAndroidHref(String tvAndroidHref) {
		this.tvAndroidHref = tvAndroidHref;
	}

	public String getDescr() {
		return descr;
	}

	public void setDescr(String descr) {
		this.descr = descr;
	}

	public String getIconUrl() {
		return iconUrl;
	}

	public void setIconUrl(String iconUrl) {
		this.iconUrl = iconUrl;
	}

	public String getAdTag() {
		return adTag;
	}

	public void setAdTag(String adTag) {
		this.adTag = adTag;
	}

	public String getShowIconUrl() {
		return showIconUrl;
	}

	public void setShowIconUrl(String showIconUrl) {
		this.showIconUrl = showIconUrl;
	}

	public String statusShow() {
		String statusShow = "";
		if ("-1".equals(this.status)) {
			statusShow = "审核未通过";
		} else if ("0".equals(this.status)) {
			statusShow = "审核中";
		} else if ("1".equals(this.status)) {
			statusShow = "审核通过";
		} else if ("2".equals(this.status)) {
			statusShow = "投放中";
		} else if ("3".equals(this.status)) {
			statusShow = "暂停投放";
		} else if ("4".equals(this.status)) {
			statusShow = "投放结束";
		}
		return statusShow;
	}

	public String versionCode() {
		if (StringUtils.isNotBlank(this.mIosVcode)) {
			this.versionCode = this.mIosVcode;
			return this.versionCode;
		}
		if (StringUtils.isNotBlank(this.mAndroidVcode)) {
			this.versionCode = this.mAndroidVcode;
			return this.versionCode;
		}
		if (StringUtils.isNotBlank(this.pcIosVcode)) {
			this.versionCode = this.pcIosVcode;
			return this.versionCode;
		}
		if (StringUtils.isNotBlank(this.pcWVcode)) {
			this.versionCode = this.pcWVcode;
			return this.versionCode;
		}
		if (StringUtils.isNotBlank(this.padIosVcode)) {
			this.versionCode = this.padIosVcode;
			return this.versionCode;
		}
		if (StringUtils.isNotBlank(this.padAndroidVcode)) {
			this.versionCode = this.padAndroidVcode;
			return this.versionCode;
		}
		if (StringUtils.isNotBlank(this.tvIosVcode)) {
			this.versionCode = this.tvIosVcode;
			return this.versionCode;
		}
		if (StringUtils.isNotBlank(this.tvAndroidVcode)) {
			this.versionCode = this.tvAndroidVcode;
			return this.versionCode;
		}
		return this.versionCode;
	}

	public String osType() {
		this.osType = "";
		if (StringUtils.isNotBlank(this.mIosUrl)) {
			this.osType = "IOS ";
			return this.osType;
		}
		if (StringUtils.isNotBlank(this.mAndroidUrl)
				&& !this.osType.contains("Andoird")) {
			this.osType += "Andoird ";
			return this.osType;
		}
		if (StringUtils.isNotBlank(this.pcIosUrl)
				&& !this.osType.contains("IOS")) {
			this.osType += "IOS ";
			return this.osType;
		}
		if (StringUtils.isNotBlank(this.pcWUrl)
				&& !this.osType.contains("Windows")) {
			this.osType += "Windows ";
			return this.osType;
		}
		if (StringUtils.isNotBlank(this.padIosVcode)
				&& !this.osType.contains("IOS")) {
			this.osType += "IOS ";
			return this.osType;
		}
		if (StringUtils.isNotBlank(this.padAndroidVcode)
				&& !this.osType.contains("Andoird")) {
			this.osType += "Andoird ";
			return this.osType;
		}
		if (StringUtils.isNotBlank(this.tvIosVcode)
				&& !this.osType.contains("IOS")) {
			this.osType += "IOS ";
			return this.osType;
		}
		if (StringUtils.isNotBlank(this.tvAndroidVcode)
				&& !this.osType.contains("Andoird")) {
			this.osType += "Andoird ";
			return this.osType;
		}
		return this.osType;
	}

	public String terminalType() {
		this.terminalType = "";
		if (StringUtils.isNotBlank(this.mIosUrl)) {
			this.terminalType = "手机";
			return this.terminalType;
		}
		if (StringUtils.isNotBlank(this.mAndroidUrl)
				&& !this.terminalType.contains("手机")) {
			this.terminalType += "手机";
			return this.terminalType;
		}
		if (StringUtils.isNotBlank(this.pcIosUrl)
				&& !this.terminalType.contains("PC")) {
			this.terminalType += "PC";
			return this.terminalType;
		}
		if (StringUtils.isNotBlank(this.pcWUrl)
				&& !this.terminalType.contains("PC")) {
			this.terminalType += "PC";
			return this.terminalType;
		}
		if (StringUtils.isNotBlank(this.padIosUrl)
				&& !this.terminalType.contains("PAD")) {
			this.terminalType += "PAD";
			return this.terminalType;
		}
		if (StringUtils.isNotBlank(this.padAndroidUrl)
				&& !this.terminalType.contains("PAD")) {
			this.terminalType += "PAD";
			return this.terminalType;
		}
		if (StringUtils.isNotBlank(this.tvIosUrl)
				&& !this.terminalType.contains("TV")) {
			this.terminalType += "TV";
			return this.terminalType;
		}
		if (StringUtils.isNotBlank(this.tvAndroidUrl)
				&& !this.terminalType.contains("TV")) {
			this.terminalType += "TV";
			return this.terminalType;
		}
		return this.terminalType;
	}

}
